package com.edu.test;

import com.edu.bean.MyDataSource;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {

    @Test
    public void test1() throws Exception {
        ClassPathXmlApplicationContext app = new ClassPathXmlApplicationContext("app.xml");
        MyDataSource myDataSource = app.getBean("myDataSource", MyDataSource.class);
        myDataSource.getConnection();
        app.close();
    }
}
